<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'inventorysetup-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'accountingtype'); ?>
		<?php echo $form->dropDownList($model,'accountingtype',array(0=>'Average Price')); ?>
		<?php echo $form->error($model,'accountingtype'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'defaultpricebook'); ?>
                <?php  
                      
                       $models = Pricebooks::model()->findAll();
                       $data = CHtml::listData($models,'book','bookdesc');
                        $data=$data + array('ALL'=>'ALL'); 
                ?>
		<?php echo $form->dropDownList($model,'defaultpricebook',$data); ?>
		<?php echo $form->error($model,'defaultpricebook'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'defaultmarkupcode'); ?>
                <?php  $models = Markupcodes::model()->findAll(array('group'=>'markup'));
                       $data = CHtml::listData($models,'markup','markup');
                ?>
            
		<?php echo $form->dropDownList($model,'defaultmarkupcode',$data); ?>
		<?php echo $form->error($model,'defaultmarkupcode'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'defaultwarehouse'); ?>
                <?php  $models = Warehouse::model()->findAll();
                       $data = CHtml::listData($models,'warehouseid','warehousedesc');
                ?>
		<?php echo $form->dropDownList($model,'defaultwarehouse',$data); ?>
		<?php echo $form->error($model,'defaultwarehouse'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->